<div class="node sticky">
        <h2 class="title"><%=h @post.title %></h2>
        <span class="submitted">Submitted on <%=h @post.created_at %>
        <span class="user_badges">
        </span> </span>
        <div class="content">
          <div style="margin: 1px 1px 5px; padding: 1px; background-color: rgb(255, 255, 255);">
            <div style="margin-left: 0pt; padding-left: 0px; margin-top: 0pt; margin-bottom: 0pt; padding-right: 5px; position: relative;">
              <div style="margin-top: 5px; margin-bottom: 5px;">
                  <%    if @post.img != nil
                           @mugshots = Mugshot.find_all_by_filename(@post.img)
                           i =0
                           for mugshot in @mugshots do
                             if i==0
                            %>
                              <div style="float: left;">
                              <%= link_to image_tag(mugshot.public_filename,:size => "200x150"), mugshot.public_filename %>
                              </div>
                  <%         i=i+1
                             end
                          end
                      end %>
                 <div style="float: left; width: 180px; padding-left: 10px;">
                <%   if   @post.intro != nil %>
                   <p><%=h @post.intro %></p><br/>
                <%   end %>
                    <p><%=h @post.body %></p>
                    </div> <div style="clear: both;"></div> </div> </div> </div>
        </div>
	<div class="nlinks">»
          <ul class="links inline">
            <li class="blog_usernames_blog first">
              <%=
              if @post.author
               "โพสโดย "+ @post.author
              end
            %>
            </li>
         </ul>
        </div>
  </div>
<h4>ความเห็น :</h4>

  <% @post.comments.each do |comment| %>

 <div class="comment ">
    <div class="submitted">Submitted on <%= comment.created_at.strftime("%B %d, %Y at %I:%M %p") %><span class="user_badges"></div>
      <div class="content">
        <p><%= h comment.comment %></p><br/>
      </div>
    <div class="nlinks">»
    </div>
  </div>
  <% end %>
<% form_for(:comment, :url => post_comments_path(@post)) do |f| %>
   <p>ความเห็น :<br/>
   <%= f.text_area(:comment, :size => "30x10") %></p>
   <%= f.submit "Create" %>
<%end %>
<%= link_to 'Edit', edit_post_path(@post) %> |
<%= link_to 'Back', posts_path %>